/**
 * @class 装备
 */
class Equipment {
    /**
     * 
     * @param {String} name 名字
     * @param {String} key 英文名每个单独类型唯一
     * @param {Image} img 武器图片
     * @param {String} position 装备适用部位 [head头部装备,body身体,foot脚部,ornament饰品,arms武器]
     */
    constructor(name, key, img, position) {
        this.name = name;
        this.key = key;
        this.img = img;
        this.position = position;
        this.x = 0;
        this.y = 0;
        this.w = 0;
        this.h = 0;
        /**重量 */
        this.weight = 0;
        /**价格 */
        this.price = 0;
        /**售价 */
        this.sale = 0;
        /**阶级 */
        this.class = '';
        /**拳、剑、刀、鞭、暗器*/
        this.type = '';
        /**允许装备的等级,性别 */
        this.allow = {
            level: 0,
            sex: '',
        };
        /**装备的特殊效果buff/debuff */
        this.effect = [];
        /**攻击力 */
        this.attack = [];
        /**防御力 */
        this.defense = [];
        /**词条、信息 */
        this.info = '';
        this.isDisplay = false;
    }
}

module.exports = Equipment;